﻿using System;

namespace RpcHelper.StringParse
{
    internal class ObjectParse : IStringParse
    {
        public Type Type => typeof(object);

        public dynamic Parse(string str, Type type)
        {
            return Tools.Json(str, type);
        }

        public bool TryParse(string str, Type type, out dynamic result)
        {
            result = Tools.Json(str, type);
            return true;
        }
    }
}
